package com.example.TestCode.measurement;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */
public class experiment2 {
    public void select_sort(int a[]) {
        int i, j, k, t, n = a.length;
        for (i = 0; i < n - 1; i++) {
            k = i;
            for (j = i + 1; j < n; j++) {
                if (a[j] < a[k])
                    k = j;
            }
            if (i != k) {
                t = a[k];
                a[k] = a[i];
                a[i] = t;
            }
        }
    }



}
